﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using WF_QLThuVien.Entities.PhieuMuon;

namespace WF_QLThuVien.Entities
{
    public class CDocGia
    {
        private String m_docGiaID;

        public String DocGiaID
        {
            get { return m_docGiaID; }
            set { m_docGiaID = value; }
        }
        private String m_tenDocGia;

        public String TenDocGia
        {
            get { return m_tenDocGia; }
            set { m_tenDocGia = value; }
        }
        private String m_maSoSV;

        public String MaSoSV
        {
            get { return m_maSoSV; }
            set { m_maSoSV = value; }
        }
        private DateTime m_ngaySinh;

        public DateTime NgaySinh
        {
            get { return m_ngaySinh; }
            set { m_ngaySinh = value; }
        }
        private bool m_gioiTinh;

        public bool GioiTinh
        {
            get { return m_gioiTinh; }
            set { m_gioiTinh = value; }
        }
        private String m_soDT;

        public String SoDT
        {
            get { return m_soDT; }
            set { m_soDT = value; }
        }
        private DateTime m_ngayLapThe;

        public DateTime NgayLapThe
        {
            get { return m_ngayLapThe; }
            set { m_ngayLapThe = value; }
        }
        private String m_tinhTrang;

        public String TinhTrang
        {
            get { return m_tinhTrang; }
            set { m_tinhTrang = value; }
        }
        private double m_kyQuy;

        public double KyQuy
        {
            get { return m_kyQuy; }
            set { m_kyQuy = value; }
        }
        private String m_nienKhoa;

        public String NienKhoa
        {
            get { return m_nienKhoa; }
            set { m_nienKhoa = value; }
        }
        private String m_lop;

        public String Lop
        {
            get { return m_lop; }
            set { m_lop = value; }
        }
        private String m_khoa;

        public String Khoa
        {
            get { return m_khoa; }
            set { m_khoa = value; }
        }

        private List<CPhieuMuon> m_dsPhieuMuon;

        public List<CPhieuMuon> DsPhieuMuon
        {
            get { return m_dsPhieuMuon; }
            set { m_dsPhieuMuon = value; }
        }

        public CDocGia()
        {
            m_docGiaID = "";
            m_tenDocGia = "";
            m_maSoSV = "";
            m_gioiTinh = true;
            m_soDT = "";
            m_ngayLapThe = DateTime.Now;
            m_tinhTrang = "";
            m_kyQuy = 0;
            m_nienKhoa = "";
            m_lop = "";
            m_khoa = "";
            m_dsPhieuMuon = new List<CPhieuMuon>();
        }

        public CDocGia(DataRow row)
        {
            m_docGiaID = (String)row["DocGiaID"].ToString();
            m_tenDocGia = (String)row["TenDocGia"].ToString();
            m_maSoSV = (String)row["MaSoSV"].ToString();
            m_gioiTinh = row["GioiTinh"] == "Nam" ? true : false;
            m_soDT = (String)row["SoDT"].ToString();
            m_ngayLapThe = (DateTime)row["NgayLapThe"];
            m_tinhTrang = (String)row["TinhTrang"].ToString();
            m_kyQuy = (double)row["KyQuy"];
            m_nienKhoa = (String)row["NienKhoa"].ToString();
            m_lop = (String)row["Lop"].ToString();
            m_khoa = (String)row["Khoa"].ToString();
        }
    }
}
